package day11;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Divide6 {
    public static final Logger Log= LoggerFactory.getLogger(Divide6.class);
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        try {
            Log.debug("请输入第一个数：");
            int a = in.nextInt();
            Log.debug("请输入第二个数:");
            int b = in.nextInt();
            int c = a / b;
            Log.info("a="+a+",b="+b);
            Log.info("商是：" + c);
        }catch (InputMismatchException e) {
            Log.error("输入出问题了" , e);
            //e.printStackTrace();//根源
            //System.exit(0);
        }catch(ArithmeticException e){
            Log.error("出现了除磷错误！",e);
            //e.printStackTrace();
        }catch (Exception e){
            Log.error("出了其他问题了",e);
        }
        finally {
            Log.error("感谢使用,88");
        }

    }
}
